package com.pms.service;

import java.util.List;

import com.pms.dao.CommentDao;
import com.pms.entity.Comment;
import com.pms.entity.Data;
import com.pms.util.Page;

public class CommentService {

	CommentDao commentDao = new CommentDao();
	public void saveIdeaComment(String content, String ideaId, String memberId,
			String projectId) {
		
		commentDao.saveIdeaComment(content,ideaId,memberId,projectId);
	}
	public Page<Comment> findMyComment(String projectId, String ideaId, int pageNum) {
		
		Page<Comment> page = new Page<Comment>(5,commentDao.getCount(projectId),pageNum);
		return commentDao.findMyIdeaComment(projectId, ideaId,page);
		
	}
	public void deleteCommentById(String commentId) {
		
		commentDao.deleteCommentById(commentId);
		
	}

}
